from dog import Dog
# class Dog():
#   def __init__(self, name, age):
#     self.name = name
#     self.age = age
  
#   def sit(self):
#     '''模拟蹲下'''
#     print(self.name.title(),'is now sitting')
#   def roll_over(self):
#     '''打滚'''
#     print(self.name.title(),'rolled over')

# dog = Dog('pp',6)
# dog.sit()
# print(dog.name)
# print(dog.age)

# class Pet(Dog):
#   def __init__(self,name,age):
#     '''初始化父类的属性'''
#     super().__init__(name, age)

# a = Pet('AAA',8)
# a.sit()
#-------------------------------------------------------------
class Restaurant():
  def __init__(self, restaurant_name, cuisine_type):
    self.restaurant_name = restaurant_name
    self.cuisine_type = cuisine_type
    self.number_served = 0
  def describe_restaurant(self):
    print('The', self.restaurant_name, '\'s cuisine is', self.cuisine_type)
  def open_restaurant(self):
    print('正在营业')
  def update_served(self,num):
    self.number_served = num
    print('served is',self.number_served)
    
# fr = Restaurant('宜宾燃面','中式')
# fr.update_served(100)

class IceCream(Restaurant):
  def __init__(self, restaurant_name, cuisine_type):
    super().__init__(restaurant_name,cuisine_type)
    self.flavors = ['AAA','BBB','CCC']

  def get_flavors(self):
    for f in self.flavors:
      print(f)
  
# c = IceCream('d','hj')
# c.get_flavors()

d = Dog('funlee',22)
d.sit()




  
